#import "FoursquareSpecialAnnotation.h"

/**
 * A FoursquareSpecialAnnotation is a single special in the Foursquare
 * system represented as a map annotation for an MKMapView. 
 * 
 * @author      James Lin
 * @version     2.3.3
 * @since       2.3.3
 * @see         AddressAnnotation
 */
@implementation FoursquareSpecialAnnotation

@synthesize venueInfo; // Info for the venue

/**
 * Initialize the Foursquare special annotation.
 *
 * @param venue  the Foursquare venue where the special is
 * @return       the initialized Foursquare special annotation
 */
- (id)initWithVenue:(FoursquareVenue*)venue {
	if (self = [super initWithType:AnnotationTypeFoursquareSpecial]) {
		self.venueInfo = venue;
		[super setCoordinate:venue.venueLocation];
		
		if ([venue.venueSpecials objectForKey:@"special"]) {
			NSString* specialMsg;
			specialMsg = [[venue.venueSpecials objectForKey:@"special"] objectForKey:@"message"];
			[super setTitle:specialMsg];
		}
		
		[super setSubtitle:venue.venueName];
	}
	
	return self;
}

/**
 * Deallocate the Foursquare special annotation.
 */
- (void)dealloc {
	[venueInfo release], venueInfo = nil;
	[super dealloc];
}

@end
